package org.yunai.swjg.server.module.inventory.event;

import org.yunai.swjg.server.core.service.Online;
import org.yunai.swjg.server.module.inventory.item.Item;
import org.yunai.yfserver.event.IEvent;

/**
 * 物品数量变化事件
 * User: yunai
 * Date: 13-5-11
 * Time: 上午1:23
 */
public class ItemCountChangeEvent implements IEvent {

    /**
     * 在线信息
     */
    private final Online online;
    /**
     * 变化前的堆叠数
     */
    private final Integer oldOverlap;
    /**
     * 道具信息
     */
    private final Item item;

    public ItemCountChangeEvent(Online online, Item item, Integer oldOverlap) {
        this.online = online;
        this.item = item;
        this.oldOverlap = oldOverlap;
    }

    public Item getItem() {
        return item;
    }

    public Integer getOldOverlap() {
        return oldOverlap;
    }

    public Online getOnline() {
        return online;
    }
}
